package com.order.feign;

import com.product.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//调用第三方api，value随便写一个，重点是要指定url
@FeignClient(value = "weather-client",url = "http://localhost:9000")
public interface WeatherFeignClient {

    @GetMapping("/products/{id}")
    Product getProductById(@PathVariable("id") Long id);
}
